﻿<?xml version="1.0" encoding="utf-8"?>
<Application 
    xmlns:gui="clr-namespace:InstantSpine.GUI" 
    xmlns:core="clr-namespace:InstantSpine.Core;assembly=InstantSpine.Core" 
    xmlns:System="clr-namespace:System;assembly=mscorlib" 
    xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" 
    StartupUri="MainWindow.xaml" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    x:Class="InstantSpine.GUI.App" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:vm="clr-namespace:InstantSpine.GUI.ViewModel"
    xmlns:p="clr-namespace:InstantSpine.GUI.Properties"        
    mc:Ignorable="d">
    <Application.Resources>
        <!-- the view model for the main window -->
        <core:SpineModel x:Key="spinemodel" />
        <gui:MainWindowViewModel x:Key="mwvm"/>
        <gui:VBNumericIdToNameConverter x:Key="vbIdConverter"/>
        <!-- data templates defining editors for the different material types -->
        <ResourceDictionary x:Key="materialEditorTemplates" Source="MaterialEditorTemplates.xaml"/>
        <!-- Watermark text box watermark style -->
        <DataTemplate x:Key="wmTmplt">
            <TextBlock Text="{Binding}" FontStyle="Italic" Foreground="Gray" Margin="4,0,6,0" />
        </DataTemplate>
        <!-- Groupbox header template -->
        <DataTemplate x:Key="gbHdr">
            <TextBlock Text="{Binding}" FontWeight="Bold" FontSize="10" />
        </DataTemplate>
        <!-- style for Extended WPFToolkit MessageBoxes -->
        <Style TargetType="{x:Type xctk:MessageBox}">
            <Setter Property="TextOptions.TextFormattingMode" Value="Display" />
        </Style>
        <!-- Header style for small headers -->
        <Style TargetType="TextBlock" x:Key="smallHeader">
            <Setter Property="FontSize" Value="10" />
            <Setter Property="FontWeight" Value="Bold" />
            <Setter Property="Margin" Value="0,0,0,8" />
        </Style>
        <!-- Column header style for numeric, right-aligned datagrid columns -->
        <Style TargetType="DataGridColumnHeader" x:Key="rightAlignedColHdr">
            <Setter Property="HorizontalContentAlignment" Value="Right" />
            <Setter Property="VerticalAlignment" Value="Center" />
        </Style>
        <!-- Row header style for (simple) material properties -->
        <Style TargetType="DataGridRowHeader" x:Key="matPropRowhdr">
            <Setter Property="Content" Value="{Binding Name}" />
            <Setter Property="Padding" Value="8,2" />
        </Style>
        <!-- Cell style for numeric data grids (right-aligned) -->
        <Style TargetType="DataGridCell" x:Key="matPropCell">
            <Setter Property="TextBlock.TextAlignment" Value="Right" />
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="BorderThickness" Value="2" />
            <Style.Triggers>
                <Trigger Property="DataGridCell.IsSelected" Value="True">
                    <Setter Property="Background" Value="#FF575757" />
                    <Setter Property="BorderThickness" Value="2" />
                    <Setter Property="BorderBrush" Value="#FF575757" />
                    <Setter Property="Foreground" Value="#F0F0F0" />
                </Trigger>
                <Trigger Property="DataGridCell.IsFocused" Value="True">
                    <Setter Property="Background" Value="White" />
                    <Setter Property="BorderBrush" Value="#FF575757" />
                    <Setter Property="Foreground" Value="Black" />
                </Trigger>
            </Style.Triggers>
        </Style>
    </Application.Resources>
</Application>